3.69 \(\int \frac{(d+e x^n)^3}{a+b x^n+c x^{2 n}} \, dx\)

Optimal. Leaf size=308 \[ \frac{x \left (\frac{(2 c d-b e) \left (-c e (3 a e+b d)+b^2 e^2+c^2 d^2\right )}{\sqrt{b^2-4 a c}}-a c e^3+b^2 e^3-3 b c d e^2+3 c^2 d^2 e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{c^2 \left (b-\sqrt{b^2-4 a c}\right )}+\frac{x \left (-\frac{(2 c d-b e) \left (-c e (3 a e+b d)+b^2 e^2+c^2 d^2\right )}{\sqrt{b^2-4 a c}}-a c e^3+b^2 e^3-3 b c d e^2+3 c^2 d^2 e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{c^2 \left (\sqrt{b^2-4 a c}+b\right )}+\frac{e^2 x (3 c d-b e)}{c^2}+\frac{e^3 x^{n+1}}{c (n+1)} \]

[Out]

(e^2*(3*c*d - b*e)*x)/c^2 + (e^3*x^(1 + n))/(c*(1 + n)) + ((3*c^2*d^2*e - 3*b*c*d*e^2 + b^2*e^3 - a*c*e^3 + ((
2*c*d - b*e)*(c^2*d^2 + b^2*e^2 - c*e*(b*d + 3*a*e)))/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^
(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(c^2*(b - Sqrt[b^2 - 4*a*c])) + ((3*c^2*d^2*e - 3*b*c*d*e^2 + b^2*e
^3 - a*c*e^3 - ((2*c*d - b*e)*(c^2*d^2 + b^2*e^2 - c*e*(b*d + 3*a*e)))/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[
1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(c^2*(b + Sqrt[b^2 - 4*a*c]))

________________________________________________________________________________________

Rubi [A]  time = 0.69909, antiderivative size = 308, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.115, Rules used = {1424, 1422, 245} \[ \frac{x \left (\frac{(2 c d-b e) \left (-c e (3 a e+b d)+b^2 e^2+c^2 d^2\right )}{\sqrt{b^2-4 a c}}-a c e^3+b^2 e^3-3 b c d e^2+3 c^2 d^2 e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{c^2 \left (b-\sqrt{b^2-4 a c}\right )}+\frac{x \left (-\frac{(2 c d-b e) \left (-c e (3 a e+b d)+b^2 e^2+c^2 d^2\right )}{\sqrt{b^2-4 a c}}-a c e^3+b^2 e^3-3 b c d e^2+3 c^2 d^2 e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{c^2 \left (\sqrt{b^2-4 a c}+b\right )}+\frac{e^2 x (3 c d-b e)}{c^2}+\frac{e^3 x^{n+1}}{c (n+1)} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x^n)^3/(a + b*x^n + c*x^(2*n)),x]

[Out]

(e^2*(3*c*d - b*e)*x)/c^2 + (e^3*x^(1 + n))/(c*(1 + n)) + ((3*c^2*d^2*e - 3*b*c*d*e^2 + b^2*e^3 - a*c*e^3 + ((
2*c*d - b*e)*(c^2*d^2 + b^2*e^2 - c*e*(b*d + 3*a*e)))/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^
(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(c^2*(b - Sqrt[b^2 - 4*a*c])) + ((3*c^2*d^2*e - 3*b*c*d*e^2 + b^2*e
^3 - a*c*e^3 - ((2*c*d - b*e)*(c^2*d^2 + b^2*e^2 - c*e*(b*d + 3*a*e)))/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[
1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(c^2*(b + Sqrt[b^2 - 4*a*c]))

Rule 1424

Int[((d_) + (e_.)*(x_)^(n_))^(q_)/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> Int[ExpandIntegran
d[(d + e*x^n)^q/(a + b*x^n + c*x^(2*n)), x], x] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4
*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[q]

Rule 1422

Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*
c, 2]}, Dist[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^n), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), In
t[1/(b/2 + q/2 + c*x^n), x], x]] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ
[c*d^2 - b*d*e + a*e^2, 0] && (PosQ[b^2 - 4*a*c] ||  !IGtQ[n/2, 0])

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \frac{\left (d+e x^n\right )^3}{a+b x^n+c x^{2 n}} \, dx &=\int \left (\frac{e^2 (3 c d-b e)}{c^2}+\frac{e^3 x^n}{c}+\frac{c^2 d^3-3 a c d e^2+a b e^3+\left (3 c^2 d^2 e-3 b c d e^2+b^2 e^3-a c e^3\right ) x^n}{c^2 \left (a+b x^n+c x^{2 n}\right )}\right ) \, dx\\ &=\frac{e^2 (3 c d-b e) x}{c^2}+\frac{e^3 x^{1+n}}{c (1+n)}+\frac{\int \frac{c^2 d^3-3 a c d e^2+a b e^3+\left (3 c^2 d^2 e-3 b c d e^2+b^2 e^3-a c e^3\right ) x^n}{a+b x^n+c x^{2 n}} \, dx}{c^2}\\ &=\frac{e^2 (3 c d-b e) x}{c^2}+\frac{e^3 x^{1+n}}{c (1+n)}+\frac{\left (3 c^2 d^2 e-3 b c d e^2+b^2 e^3-a c e^3-\frac{(2 c d-b e) \left (c^2 d^2+b^2 e^2-c e (b d+3 a e)\right )}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 c^2}+\frac{\left (3 c^2 d^2 e-3 b c d e^2+b^2 e^3-a c e^3+\frac{(2 c d-b e) \left (c^2 d^2+b^2 e^2-c e (b d+3 a e)\right )}{\sqrt{b^2-4 a c}}\right ) \int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 c^2}\\ &=\frac{e^2 (3 c d-b e) x}{c^2}+\frac{e^3 x^{1+n}}{c (1+n)}+\frac{\left (3 c^2 d^2 e-3 b c d e^2+b^2 e^3-a c e^3+\frac{(2 c d-b e) \left (c^2 d^2+b^2 e^2-c e (b d+3 a e)\right )}{\sqrt{b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{c^2 \left (b-\sqrt{b^2-4 a c}\right )}+\frac{\left (3 c^2 d^2 e-3 b c d e^2+b^2 e^3-a c e^3-\frac{(2 c d-b e) \left (c^2 d^2+b^2 e^2-c e (b d+3 a e)\right )}{\sqrt{b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{c^2 \left (b+\sqrt{b^2-4 a c}\right )}\\ \end{align*}

Mathematica [A]  time = 0.87564, size = 295, normalized size = 0.96 \[ \frac{x \left (\frac{\left (\frac{(2 c d-b e) \left (-c e (3 a e+b d)+b^2 e^2+c^2 d^2\right )}{\sqrt{b^2-4 a c}}-a c e^3+b^2 e^3-3 b c d e^2+3 c^2 d^2 e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )}{b-\sqrt{b^2-4 a c}}+\frac{\left (\frac{(b e-2 c d) \left (-c e (3 a e+b d)+b^2 e^2+c^2 d^2\right )}{\sqrt{b^2-4 a c}}-a c e^3+b^2 e^3-3 b c d e^2+3 c^2 d^2 e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{\sqrt{b^2-4 a c}+b}+e^2 (3 c d-b e)+\frac{c e^3 x^n}{n+1}\right )}{c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x^n)^3/(a + b*x^n + c*x^(2*n)),x]

[Out]

(x*(e^2*(3*c*d - b*e) + (c*e^3*x^n)/(1 + n) + ((3*c^2*d^2*e - 3*b*c*d*e^2 + b^2*e^3 - a*c*e^3 + ((2*c*d - b*e)
*(c^2*d^2 + b^2*e^2 - c*e*(b*d + 3*a*e)))/Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n
)/(-b + Sqrt[b^2 - 4*a*c])])/(b - Sqrt[b^2 - 4*a*c]) + ((3*c^2*d^2*e - 3*b*c*d*e^2 + b^2*e^3 - a*c*e^3 + ((-2*
c*d + b*e)*(c^2*d^2 + b^2*e^2 - c*e*(b*d + 3*a*e)))/Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1)
, (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(b + Sqrt[b^2 - 4*a*c])))/c^2

________________________________________________________________________________________

Maple [F]  time = 0.052, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( d+e{x}^{n} \right ) ^{3}}{a+b{x}^{n}+c{x}^{2\,n}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x^n)^3/(a+b*x^n+c*x^(2*n)),x)

[Out]

int((d+e*x^n)^3/(a+b*x^n+c*x^(2*n)),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{c e^{3} x x^{n} +{\left (3 \, c d e^{2}{\left (n + 1\right )} - b e^{3}{\left (n + 1\right )}\right )} x}{c^{2}{\left (n + 1\right )}} - \int -\frac{c^{2} d^{3} -{\left (3 \, c d e^{2} - b e^{3}\right )} a +{\left (3 \, c^{2} d^{2} e - 3 \, b c d e^{2} + b^{2} e^{3} - a c e^{3}\right )} x^{n}}{c^{3} x^{2 \, n} + b c^{2} x^{n} + a c^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)^3/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

(c*e^3*x*x^n + (3*c*d*e^2*(n + 1) - b*e^3*(n + 1))*x)/(c^2*(n + 1)) - integrate(-(c^2*d^3 - (3*c*d*e^2 - b*e^3
)*a + (3*c^2*d^2*e - 3*b*c*d*e^2 + b^2*e^3 - a*c*e^3)*x^n)/(c^3*x^(2*n) + b*c^2*x^n + a*c^2), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{e^{3} x^{3 \, n} + 3 \, d e^{2} x^{2 \, n} + 3 \, d^{2} e x^{n} + d^{3}}{c x^{2 \, n} + b x^{n} + a}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)^3/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

integral((e^3*x^(3*n) + 3*d*e^2*x^(2*n) + 3*d^2*e*x^n + d^3)/(c*x^(2*n) + b*x^n + a), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**n)**3/(a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (e x^{n} + d\right )}^{3}}{c x^{2 \, n} + b x^{n} + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)^3/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

integrate((e*x^n + d)^3/(c*x^(2*n) + b*x^n + a), x)